package cn.hmcode.controller;

import cn.hmcode.service.AnythingLLMService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/anythingllm")
public class AnythingLLMController {

    @Autowired
    private AnythingLLMService anythingLLMService;

    @PostMapping("/prompt")
    public String sendPrompt(@RequestBody String prompt) {
        // school 是工作区
        return anythingLLMService.sendPrompt(prompt,"school");
    }
}
